package com.ruoyi.web.controller.greatWall;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.greatWall.ChartData;
import com.ruoyi.system.service.RelicStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @Description: 文物
 * @Author: quavario
 * @Date:   2019-05-23
 * @Version: V1.0
 */
@Slf4j
@RestController
@RequestMapping("/statistics/relic")
public class RelicStatisticsController extends BaseController {
    @Autowired
    RelicStatisticsService relicStatisticsService;

    /**
     * @return 按城市分类
     */
    @RequestMapping("/area")
    List<ChartData> getByArea() {
        List<ChartData> chartData = relicStatisticsService.getByArea();
        return chartData;
    }

    /**
     * @return 按部门分类
     */
    @RequestMapping("/dep")
    AjaxResult getByDepart() {
        List<ChartData> chartData = relicStatisticsService.getByDepart();
        return success(chartData);
    }




    @RequestMapping("/basicInfo")
    AjaxResult getBasicInfo() {
        return success(relicStatisticsService.getBasicInfo());
    }


    @RequestMapping("/info/pipe")
    AjaxResult getRelicInfoPipe() {
        return success(relicStatisticsService.getRelicInfoPipe());
    }

    @RequestMapping("/info/bar")
    AjaxResult getRelicInfoBar() {
        return success(relicStatisticsService.getRelicInfoBar());
    }

}
